from selenium import webdriver
driver = webdriver.Chrome()
driver.implicitly_wait(5)

# 打开网址
driver.get('http://cdn1.python3.vip/files/selenium/test4.html')

# 将截图存在指定文件 路径不包含中文
driver.get_screenshot_as_file(r'C:\Users\DELL\Desktop\1.png')